package com.cloud.bssp.juc.jmm;

import java.util.concurrent.TimeUnit;

/**
 * @description： TODO
 * @author：weirx
 * @date：2021/12/22 11:10
 * @version：3.0
 */
public class JMMTest {

    static Boolean state = true;

    public static void main(String[] args) throws InterruptedException {
        new Thread(() -> {
            while (state) {
//               System.out.println("t1运行中");
            }
        }, "t1").start();

        TimeUnit.MILLISECONDS.sleep(1000);
        state = false;
    }
}
